package com.hs.srm.admin.modules.quota.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("quota")
public class QuotaEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 配额id
     */
    @TableId(value = "quota_id", type = IdType.UUID)
    @TableField("quota_id")
    @Excel(name = "配额id", orderNum = "1")
    private String quotaId;

    /**
     * 物料号
     */
    @TableField("material_code")
    @Excel(name = "物料号", orderNum = "2")
    private String materialCode;

    /**
     * 物料描述
     */
    @TableField("material_desc")
    @Excel(name = "物料描述", orderNum = "3")
    private String materialDesc;

    /**
     * 创建日期
     */
    @TableField("creation_date")
    @Excel(name = "创建日期", orderNum = "4")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date creationDate;

    /**
     * 创建者
     */
    @TableField("created_by")
    @Excel(name = "创建者", orderNum = "5")
    private String createdBy;

    /**
     * 供应商编码
     */
    @TableField("vendor_code")
    @Excel(name = "供应商编码", orderNum = "6")
    private String vendorCode;

    /**
     * 供应商名称
     */
    @TableField("vendor_name")
    @Excel(name = "供应商名称", orderNum = "7")
    private String vendorName;

    /**
     * 配额数
     */
    @TableField("quota_num")
    @Excel(name = "配额数", orderNum = "8")
    private BigDecimal quotaNum;

    /**
     * 已用配额数
     */
    @TableField("used_quota_num")
    @Excel(name = "已用配额数", orderNum = "8")
    private BigDecimal usedQuotaNum;

    /**
     * 配额比
     */
    @TableField("percentile")
    @Excel(name = "配额比", orderNum = "9")
    private BigDecimal percentile;


    /**
     * 工厂
     */
    @TableField("werks")
    @Excel(name = "工厂", orderNum = "10")
    private String werks;

    /**
     * 开始时间
     */
    @TableField("start_date")
    @JSONField(format = "yyyy-MM-dd")
    @Excel(name = "开始时间", orderNum = "11")
    private Date startDate;

    /**
     * 结束时间
     */
    @TableField("end_date")
    @JSONField(format = "yyyy-MM-dd")
    @Excel(name = "结束时间", orderNum = "12")
    private Date endDate;


}
